//
//  AppDelegate.m
//  UITableView作业
//
//  Created by dllo on 16/7/25.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "AppDelegate.h"
#import "ViewController.h"

@interface AppDelegate ()

@end

@implementation AppDelegate


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    // Override point for customization after application launch.
    
//    1.根据给定的plist文件(讲师教给学员怎么使用，读取数据）, 使用tableView写一个通讯录, 要求:
//                   
//  第一个页面每个cell上显示学员姓名
//    点击某个学员, 推出到详细信息页面
//  详细信息页面使用label显示学员的详细信息
//                   NSString *path = [[NSBundle mainBundle] pathForResource:@"DLS160710" ofType:@"plist"];
//                   NSArray *array = [NSArray arrayWithContentsOfFile:path];
//  2.
//   在导航栏上增加一个按钮可以push一个添加学员页面
//   添加学员页面中使用textField让用户输入信息, 点击保存按钮将学员信息显示到第一页tableView的最后面
//                   
//   提示:
//                   
//   tableView有一个方法- (void)reloadData; 可以重载所有的dataSource协议方法. 因此可以把数据添加到数组中, 然后reloadData即可.
//   使用协议传值
    
    
    _window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
    _window.backgroundColor = [UIColor whiteColor];
    [_window makeKeyAndVisible];
    
    ViewController *vc = [[ViewController alloc] init];
    UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:vc];
    [_window setRootViewController:nav];
    
    
    
    
    
    
    return YES;
}

- (void)applicationWillResignActive:(UIApplication *)application {
    // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
    // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
}

- (void)applicationDidEnterBackground:(UIApplication *)application {
    // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
    // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}

- (void)applicationWillEnterForeground:(UIApplication *)application {
    // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
}

- (void)applicationDidBecomeActive:(UIApplication *)application {
    // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}

- (void)applicationWillTerminate:(UIApplication *)application {
    // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}

@end
